package comp.wxapi.controller;

import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.*;
import org.springframework.http.*;
import org.springframework.data.domain.*;
import org.springframework.web.bind.annotation.*;

import com.justep.cloud.microservice.http.*;
import com.justep.cloud.microservice.*;
import comp.wxapi.vo.*;


import comp.wxapi.service.X5MpService;


@RestController
public class MpController extends MicroServiceBaseController {
	private static final Logger logger = LoggerFactory.getLogger(MpController.class);
	static Map<String, Map<String, Integer>> exceptionStatusMap = new HashMap<String, Map<String, Integer>>();
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("getJsapiSignature", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("createCard", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("templateSend", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("queryOrder", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("menuDelete", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("delMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("queryEntPay", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("sendMessage", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("consumeCard", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("downloadBill", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("createSignature", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("addMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("redpackGet", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("qrcode", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("menuCreate", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("cardCodeQuery", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("materialCount", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("longUrl2ShortUrl", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("cardDelete", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("wxeventPost", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("unifiedOrder", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("refund", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("materialUploadimg", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("refundQuery", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("payNotify", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("domainVertify", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("getMenus", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("wxeventGet", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("authCallBack", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("buildAuthorizationUrl", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("addNewsMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("updateMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("entPay", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("templates", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("templateDelete", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("getTempMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("getUserInfoByOpenid", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("getOauth2UserInfo", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("addTempMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("entPayBank", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("queryEntPayBank", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("refundNotify", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("decryptCode", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("redpackSend", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("getMaterial", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("cardDetail", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("materials", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("closeOrder", map);
	}		
	@Autowired
	@Qualifier("x5MpService")
	private X5MpService service;

	//系统生成代码,请不要修改或删除 <actionStart:getJsapiSignature>
@RequestMapping(value = "/wxapi/mp/jsapi/signature", method = RequestMethod.GET)
	public ResponseEntity<String> getJsapiSignature(


@RequestParam(name = "url" ) String url
) throws Exception {
		try {
String resp = service.getJsapiSignature(url);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("getJsapiSignature");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:getJsapiSignature>
	//系统生成代码,请不要修改或删除 <actionStart:createCard>
@RequestMapping(value = "/wxapi/mp/card", method = RequestMethod.POST)
	public ResponseEntity<String> createCard(


@RequestBody String data
) throws Exception {
		try {
String resp = service.createCard(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("createCard");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:createCard>
	//系统生成代码,请不要修改或删除 <actionStart:templateSend>
@RequestMapping(value = "/wxapi/mp/template", method = RequestMethod.POST)
	public ResponseEntity<String> templateSend(


@RequestBody String data
) throws Exception {
		try {
String resp = service.templateSend(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("templateSend");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:templateSend>
	//系统生成代码,请不要修改或删除 <actionStart:queryOrder>
@RequestMapping(value = "/wxapi/mp/pay/queryOrder", method = RequestMethod.GET)
	public ResponseEntity<String> queryOrder(


@RequestParam(name = "outTradeNo" , defaultValue = "-1") String outTradeNo,
			@RequestParam(name = "transactionId" , defaultValue = "-1") String transactionId
) throws Exception {
		try {
String resp = service.queryOrder(outTradeNo,transactionId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("queryOrder");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:queryOrder>
	//系统生成代码,请不要修改或删除 <actionStart:menuDelete>
@RequestMapping(value = "/wxapi/mp/menu", method = RequestMethod.DELETE)
	public ResponseEntity<String> menuDelete(


@RequestParam(name = "group" , defaultValue = "-1") String group
) throws Exception {
		try {
String resp = service.menuDelete(group);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("menuDelete");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:menuDelete>
	//系统生成代码,请不要修改或删除 <actionStart:delMaterial>
@RequestMapping(value = "/wxapi/mp/material/{mediaId}", method = RequestMethod.DELETE)
	public ResponseEntity<String> delMaterial(


@PathVariable(name = "mediaId") String mediaId
) throws Exception {
		try {
String resp = service.delMaterial(mediaId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("delMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:delMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:queryEntPay>
@RequestMapping(value = "/wxapi/mp/pay/entpay", method = RequestMethod.GET)
	public ResponseEntity<String> queryEntPay(


@RequestParam(name = "partnerTradeNo" ) String partnerTradeNo
) throws Exception {
		try {
String resp = service.queryEntPay(partnerTradeNo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("queryEntPay");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:queryEntPay>
	//系统生成代码,请不要修改或删除 <actionStart:sendMessage>
@RequestMapping(value = "/wxapi/mp/kefu/message/send", method = RequestMethod.POST)
	public ResponseEntity<String> sendMessage(


@RequestParam(name = "data" ) String data
) throws Exception {
		try {
String resp = service.sendMessage(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("sendMessage");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:sendMessage>
	//系统生成代码,请不要修改或删除 <actionStart:consumeCard>
@RequestMapping(value = "/wxapi/mp/card/consume", method = RequestMethod.POST)
	public ResponseEntity<String> consumeCard(


@RequestBody String data
) throws Exception {
		try {
String resp = service.consumeCard(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("consumeCard");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:consumeCard>
	//系统生成代码,请不要修改或删除 <actionStart:downloadBill>
@RequestMapping(value = "/wxapi/mp/pay/downloadBill", method = RequestMethod.GET)
	public ResponseEntity<String> downloadBill(


@RequestParam(name = "billDate" ) String billDate,
			@RequestParam(name = "billType" , defaultValue = "ALL") String billType,
			@RequestParam(name = "tarType" , defaultValue = "GZIP") String tarType,
			@RequestParam(name = "deviceInfo" , defaultValue = "-1") String deviceInfo
) throws Exception {
		try {
String resp = service.downloadBill(billDate,billType,tarType,deviceInfo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("downloadBill");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:downloadBill>
	//系统生成代码,请不要修改或删除 <actionStart:createSignature>
@RequestMapping(value = "/wxapi/mp/card/signature", method = RequestMethod.POST)
	public ResponseEntity<String> createSignature(


@RequestBody String data
) throws Exception {
		try {
String resp = service.createSignature(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("createSignature");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:createSignature>
	//系统生成代码,请不要修改或删除 <actionStart:addMaterial>
@RequestMapping(value = "/wxapi/mp/material", method = RequestMethod.POST)
	public ResponseEntity<String> addMaterial(


@RequestBody MaterialVo materialVo
) throws Exception {
		try {
String resp = service.addMaterial(materialVo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("addMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:addMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:redpackGet>
@RequestMapping(value = "/wxapi/mp/pay/redpack", method = RequestMethod.GET)
	public ResponseEntity<String> redpackGet(


@RequestParam(name = "commondCode" ) String commondCode,
			@RequestParam(name = "mchBillNo" , defaultValue = "-1") String mchBillNo
) throws Exception {
		try {
String resp = service.redpackGet(commondCode,mchBillNo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("redpackGet");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:redpackGet>
	//系统生成代码,请不要修改或删除 <actionStart:qrcode>
@RequestMapping(value = "/wxapi/mp/qrcode", method = RequestMethod.GET)
	public ResponseEntity<String> qrcode(


@RequestParam(name = "sceneId" , defaultValue = "-1") Integer sceneId,
			@RequestParam(name = "sceneStr" , defaultValue = "-1") String sceneStr,
			@RequestParam(name = "expireSeconds" , defaultValue = "180") Integer expireSeconds,
			@RequestParam(name = "qrcodeType" , defaultValue = "TEMP") String qrcodeType
) throws Exception {
		try {
String resp = service.qrcode(sceneId,sceneStr,expireSeconds,qrcodeType);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("qrcode");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:qrcode>
	//系统生成代码,请不要修改或删除 <actionStart:menuCreate>
@RequestMapping(value = "/wxapi/mp/menu", method = RequestMethod.POST)
	public ResponseEntity<String> menuCreate(


@RequestBody String data
) throws Exception {
		try {
String resp = service.menuCreate(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("menuCreate");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:menuCreate>
	//系统生成代码,请不要修改或删除 <actionStart:cardCodeQuery>
@RequestMapping(value = "/wxapi/mp/card/code/query", method = RequestMethod.GET)
	public ResponseEntity<String> cardCodeQuery(


@RequestParam(name = "code" ) String code,
			@RequestParam(name = "cardId" ) String cardId
) throws Exception {
		try {
String resp = service.cardCodeQuery(code,cardId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("cardCodeQuery");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:cardCodeQuery>
	//系统生成代码,请不要修改或删除 <actionStart:materialCount>
@RequestMapping(value = "/wxapi/mp/material/count", method = RequestMethod.GET)
	public ResponseEntity<String> materialCount(


@RequestParam(name = "group" , defaultValue = "-1") String group
) throws Exception {
		try {
String resp = service.materialCount(group);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("materialCount");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:materialCount>
	//系统生成代码,请不要修改或删除 <actionStart:longUrl2ShortUrl>
@RequestMapping(value = "/wxapi/mp/utils/shorturl", method = RequestMethod.GET)
	public ResponseEntity<String> longUrl2ShortUrl(


@RequestParam(name = "url" ) String url
) throws Exception {
		try {
String resp = service.longUrl2ShortUrl(url);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("longUrl2ShortUrl");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:longUrl2ShortUrl>
	//系统生成代码,请不要修改或删除 <actionStart:cardDelete>
@RequestMapping(value = "/wxapi/mp/card/{cardId}", method = RequestMethod.DELETE)
	public ResponseEntity<String> cardDelete(


@PathVariable(name = "cardId") String cardId
) throws Exception {
		try {
String resp = service.cardDelete(cardId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("cardDelete");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:cardDelete>
	//系统生成代码,请不要修改或删除 <actionStart:wxeventPost>
@RequestMapping(value = "/wxapi/mp/event", method = RequestMethod.POST)
	public ResponseEntity<String> wxeventPost(


@RequestBody String data
) throws Exception {
		try {
String resp = service.wxeventPost(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("wxeventPost");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:wxeventPost>
	//系统生成代码,请不要修改或删除 <actionStart:unifiedOrder>
@RequestMapping(value = "/wxapi/mp/pay/unifiedOrder", method = RequestMethod.POST)
	public ResponseEntity<String> unifiedOrder(


@RequestBody String orderData
) throws Exception {
		try {
String resp = service.unifiedOrder(orderData);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("unifiedOrder");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:unifiedOrder>
	//系统生成代码,请不要修改或删除 <actionStart:refund>
@RequestMapping(value = "/wxapi/mp/pay/refund", method = RequestMethod.POST)
	public ResponseEntity<String> refund(


@RequestBody String refundData
) throws Exception {
		try {
String resp = service.refund(refundData);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("refund");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:refund>
	//系统生成代码,请不要修改或删除 <actionStart:materialUploadimg>
@RequestMapping(value = "/wxapi/mp/material/uploadimg", method = RequestMethod.POST)
	public ResponseEntity<String> materialUploadimg(


@RequestBody MaterialVo materialVo
) throws Exception {
		try {
String resp = service.materialUploadimg(materialVo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("materialUploadimg");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:materialUploadimg>
	//系统生成代码,请不要修改或删除 <actionStart:refundQuery>
@RequestMapping(value = "/wxapi/mp/pay/refund", method = RequestMethod.GET)
	public ResponseEntity<String> refundQuery(


@RequestParam(name = "outTradeNo" , defaultValue = "-1") String outTradeNo,
			@RequestParam(name = "transactionId" , defaultValue = "-1") String transactionId,
			@RequestParam(name = "outRefundNo" , defaultValue = "-1") String outRefundNo,
			@RequestParam(name = "refundId" , defaultValue = "-1") String refundId
) throws Exception {
		try {
String resp = service.refundQuery(outTradeNo,transactionId,outRefundNo,refundId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("refundQuery");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:refundQuery>
	//系统生成代码,请不要修改或删除 <actionStart:payNotify>
@RequestMapping(value = "/wxapi/mp/pay/notify", method = RequestMethod.POST)
	public ResponseEntity<String> payNotify(


@RequestBody String data
) throws Exception {
		try {
String resp = service.payNotify(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("payNotify");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:payNotify>
	//系统生成代码,请不要修改或删除 <actionStart:domainVertify>
@RequestMapping(value = "/wxapi/mp/domain/vertify/{fileName}", method = RequestMethod.GET)
	public ResponseEntity<String> domainVertify(


@PathVariable(name = "fileName") String fileName
) throws Exception {
		try {
String resp = service.domainVertify(fileName);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("domainVertify");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:domainVertify>
	//系统生成代码,请不要修改或删除 <actionStart:getMenus>
@RequestMapping(value = "/wxapi/mp/menus", method = RequestMethod.GET)
	public ResponseEntity<String> getMenus(


@RequestParam(name = "group" , defaultValue = "-1") String group
) throws Exception {
		try {
String resp = service.getMenus(group);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("getMenus");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:getMenus>
	//系统生成代码,请不要修改或删除 <actionStart:wxeventGet>
@RequestMapping(value = "/wxapi/mp/event", method = RequestMethod.GET)
	public ResponseEntity<String> wxeventGet() throws Exception {
		try {
String resp = service.wxeventGet();
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("wxeventGet");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:wxeventGet>
	//系统生成代码,请不要修改或删除 <actionStart:authCallBack>
@RequestMapping(value = "/wxapi/mp/oauth2/authCallBack", method = RequestMethod.GET)
	public ResponseEntity authCallBack(


@RequestParam(name = "code" ) String code,
			@RequestParam(name = "redirect_uri" ) String redirect_uri
) throws Exception {
		try {
service.authCallBack(code,redirect_uri);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity ret = new ResponseEntity(headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("authCallBack");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:authCallBack>
	//系统生成代码,请不要修改或删除 <actionStart:buildAuthorizationUrl>
@RequestMapping(value = "/wxapi/mp/oauth2/buildAuthorizationUrl", method = RequestMethod.POST)
	public ResponseEntity<String> buildAuthorizationUrl(


@RequestParam(name = "redirectUri" ) String redirectUri
) throws Exception {
		try {
String resp = service.buildAuthorizationUrl(redirectUri);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("buildAuthorizationUrl");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:buildAuthorizationUrl>
	//系统生成代码,请不要修改或删除 <actionStart:addNewsMaterial>
@RequestMapping(value = "/wxapi/mp/material/news", method = RequestMethod.POST)
	public ResponseEntity<String> addNewsMaterial(


@RequestBody String data
) throws Exception {
		try {
String resp = service.addNewsMaterial(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("addNewsMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:addNewsMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:updateMaterial>
@RequestMapping(value = "/wxapi/mp/material/news/{mediaId}/{index}", method = RequestMethod.PUT)
	public ResponseEntity<String> updateMaterial(


@PathVariable(name = "mediaId") String mediaId,
			@PathVariable(name = "index") Integer index,
			@RequestBody String data
) throws Exception {
		try {
String resp = service.updateMaterial(mediaId,index,data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("updateMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:updateMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:entPay>
@RequestMapping(value = "/wxapi/mp/pay/entpay", method = RequestMethod.POST)
	public ResponseEntity<String> entPay(


@RequestBody String data
) throws Exception {
		try {
String resp = service.entPay(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("entPay");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:entPay>
	//系统生成代码,请不要修改或删除 <actionStart:templates>
@RequestMapping(value = "/wxapi/mp/templates", method = RequestMethod.GET)
	public ResponseEntity<String> templates() throws Exception {
		try {
String resp = service.templates();
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("templates");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:templates>
	//系统生成代码,请不要修改或删除 <actionStart:templateDelete>
@RequestMapping(value = "/wxapi/mp/template/{templateId}", method = RequestMethod.DELETE)
	public ResponseEntity<String> templateDelete(


@PathVariable(name = "templateId") String templateId
) throws Exception {
		try {
String resp = service.templateDelete(templateId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("templateDelete");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:templateDelete>
	//系统生成代码,请不要修改或删除 <actionStart:getTempMaterial>
@RequestMapping(value = "/wxapi/mp/material/temp/{mediaId}", method = RequestMethod.GET)
	public ResponseEntity<String> getTempMaterial(


@PathVariable(name = "mediaId") String mediaId
) throws Exception {
		try {
String resp = service.getTempMaterial(mediaId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("getTempMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:getTempMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:getUserInfoByOpenid>
@RequestMapping(value = "/wxapi/mp/user/userInfo", method = RequestMethod.GET)
	public ResponseEntity<String> getUserInfoByOpenid(


@RequestParam(name = "openid" , defaultValue = "openid") String openid
) throws Exception {
		try {
String resp = service.getUserInfoByOpenid(openid);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("getUserInfoByOpenid");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:getUserInfoByOpenid>
	//系统生成代码,请不要修改或删除 <actionStart:getOauth2UserInfo>
@RequestMapping(value = "/wxapi/mp/oauth2/userInfo", method = RequestMethod.GET)
	public ResponseEntity<String> getOauth2UserInfo(


@RequestParam(name = "type" ) String type,
			@RequestParam(name = "code" ) String code,
			@RequestParam(name = "lang" , defaultValue = "zh_CN") String lang
) throws Exception {
		try {
String resp = service.getOauth2UserInfo(type,code,lang);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("getOauth2UserInfo");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:getOauth2UserInfo>
	//系统生成代码,请不要修改或删除 <actionStart:addTempMaterial>
@RequestMapping(value = "/wxapi/mp/material/temp", method = RequestMethod.POST)
	public ResponseEntity<String> addTempMaterial(


@RequestBody MaterialVo materialVo
) throws Exception {
		try {
String resp = service.addTempMaterial(materialVo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("addTempMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:addTempMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:entPayBank>
@RequestMapping(value = "/wxapi/mp/pay/entpay/bank", method = RequestMethod.POST)
	public ResponseEntity<String> entPayBank(


@RequestBody String data
) throws Exception {
		try {
String resp = service.entPayBank(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("entPayBank");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:entPayBank>
	//系统生成代码,请不要修改或删除 <actionStart:queryEntPayBank>
@RequestMapping(value = "/wxapi/mp/pay/entpay/bank", method = RequestMethod.GET)
	public ResponseEntity<String> queryEntPayBank(


@RequestParam(name = "partnerTradeNo" ) String partnerTradeNo
) throws Exception {
		try {
String resp = service.queryEntPayBank(partnerTradeNo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("queryEntPayBank");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:queryEntPayBank>
	//系统生成代码,请不要修改或删除 <actionStart:refundNotify>
@RequestMapping(value = "/wxapi/mp/pay/refund/notify", method = RequestMethod.POST)
	public ResponseEntity<String> refundNotify(


@RequestBody String data
) throws Exception {
		try {
String resp = service.refundNotify(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("refundNotify");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:refundNotify>
	//系统生成代码,请不要修改或删除 <actionStart:decryptCode>
@RequestMapping(value = "/wxapi/mp/card/decrypt/code", method = RequestMethod.GET)
	public ResponseEntity<String> decryptCode(


@RequestParam(name = "encryptCode" ) String encryptCode
) throws Exception {
		try {
String resp = service.decryptCode(encryptCode);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("decryptCode");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:decryptCode>
	//系统生成代码,请不要修改或删除 <actionStart:redpackSend>
@RequestMapping(value = "/wxapi/mp/pay/redpack", method = RequestMethod.POST)
	public ResponseEntity<String> redpackSend(


@RequestBody String data
) throws Exception {
		try {
String resp = service.redpackSend(data);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("redpackSend");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:redpackSend>
	//系统生成代码,请不要修改或删除 <actionStart:getMaterial>
@RequestMapping(value = "/wxapi/mp/material/{mediaId}", method = RequestMethod.GET)
	public ResponseEntity<String> getMaterial(


@PathVariable(name = "mediaId") String mediaId
) throws Exception {
		try {
String resp = service.getMaterial(mediaId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("getMaterial");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:getMaterial>
	//系统生成代码,请不要修改或删除 <actionStart:cardDetail>
@RequestMapping(value = "/wxapi/mp/card/detail/{cardId}", method = RequestMethod.GET)
	public ResponseEntity<String> cardDetail(


@PathVariable(name = "cardId") String cardId
) throws Exception {
		try {
String resp = service.cardDetail(cardId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("cardDetail");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:cardDetail>
	//系统生成代码,请不要修改或删除 <actionStart:materials>
@RequestMapping(value = "/wxapi/mp/materials", method = RequestMethod.GET)
	public ResponseEntity<String> materials(


@RequestParam(name = "pageNum" , defaultValue = "1") Integer pageNum,
			@RequestParam(name = "pageSize" , defaultValue = "20") Integer pageSize,
			@RequestParam(name = "type" ) String type
) throws Exception {
		try {
String resp = service.materials(pageNum,pageSize,type);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("materials");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:materials>
	//系统生成代码,请不要修改或删除 <actionStart:closeOrder>
@RequestMapping(value = "/wxapi/mp/pay/closeOrder", method = RequestMethod.POST)
	public ResponseEntity<String> closeOrder(


@RequestParam(name = "outTradeNo" ) String outTradeNo
) throws Exception {
		try {
String resp = service.closeOrder(outTradeNo);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("closeOrder");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:closeOrder>
	@Override
	protected Map<String, Map<String, Integer>> getExceptionStatusMap() {
		return exceptionStatusMap;
	}
}
